<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Ornament.NHibernates.Configurations.MappingCollection>" %>
<%@ Import Namespace="Ornament.NHibernateHelper" %>
<ul style="list-style-type: none" id="mappingList">
    <%
        foreach (var s in (IList<String>)TempData["assembly"])
        {
            var id = s.Replace(".", "_");
    %>
    <li>
        <input type="checkbox" name="<%=s%>" value="<%=s%>" id="<%=id%>" />
        <label for="<%=id%>">
            <%=s%></label>
    </li>
    <%
        

        }%>
</ul>
<%
    var include = "";
    foreach (Mapping map in this.Model)
    {
        include += "[name=" + map.Assembly + "],";
    }
    
%>

<script language="javascript" type="text/javascript">
    $("<%=include %>").attr("checked", true);
</script>

